package com.linkage.lcims.base.po.business;

import java.io.Serializable;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;


/** 
 *        @hibernate.class
 *         table="BD_TOLL_MONTH_RENT"
 *     
*/
@SuppressWarnings("serial")
public class BdTollMonthRent implements Serializable {

    /** identifier field */
    private com.linkage.lcims.base.po.business.BdTollMonthRentPK comp_id;

    /** persistent field */
    private Integer calculateby;

    /** persistent field */
    private Integer unit;

    /** persistent field */
    private Integer endaddspan;

    /** nullable persistent field */
    private Integer rent;

    /** persistent field */
    private Integer adjustflag;

    /** nullable persistent field */
    private Integer adjustrate;

    /** nullable persistent field */
    private Integer adjustunit;

    /** nullable persistent field */
    private String description;

    /** full constructor */
    public BdTollMonthRent(com.linkage.lcims.base.po.business.BdTollMonthRentPK comp_id, Integer calculateby, Integer unit, Integer endaddspan, Integer rent, Integer adjustflag, Integer adjustrate, Integer adjustunit, String description) {
        this.comp_id = comp_id;
        this.calculateby = calculateby;
        this.unit = unit;
        this.endaddspan = endaddspan;
        this.rent = rent;
        this.adjustflag = adjustflag;
        this.adjustrate = adjustrate;
        this.adjustunit = adjustunit;
        this.description = description;
    }

    /** default constructor */
    public BdTollMonthRent() {
    }

    /** minimal constructor */
    public BdTollMonthRent(com.linkage.lcims.base.po.business.BdTollMonthRentPK comp_id, Integer calculateby, Integer unit, Integer endaddspan, Integer adjustflag) {
        this.comp_id = comp_id;
        this.calculateby = calculateby;
        this.unit = unit;
        this.endaddspan = endaddspan;
        this.adjustflag = adjustflag;
    }

    /** 
     *            @hibernate.id
     *             generator-class="assigned"
     *         
     */
    public com.linkage.lcims.base.po.business.BdTollMonthRentPK getComp_id() {
        return this.comp_id;
    }

    public void setComp_id(com.linkage.lcims.base.po.business.BdTollMonthRentPK comp_id) {
        this.comp_id = comp_id;
    }

    /** 
     *            @hibernate.property
     *             column="calculateby"
     *             length="10"
     *             not-null="true"
     *         
     */
    public Integer getCalculateby() {
        return this.calculateby;
    }

    public void setCalculateby(Integer calculateby) {
        this.calculateby = calculateby;
    }

    /** 
     *            @hibernate.property
     *             column="unit"
     *             length="10"
     *             not-null="true"
     *         
     */
    public Integer getUnit() {
        return this.unit;
    }

    public void setUnit(Integer unit) {
        this.unit = unit;
    }

    /** 
     *            @hibernate.property
     *             column="endaddspan"
     *             length="10"
     *             not-null="true"
     *         
     */
    public Integer getEndaddspan() {
        return this.endaddspan;
    }

    public void setEndaddspan(Integer endaddspan) {
        this.endaddspan = endaddspan;
    }

    /** 
     *            @hibernate.property
     *             column="rent"
     *             length="10"
     *         
     */
    public Integer getRent() {
        return this.rent;
    }

    public void setRent(Integer rent) {
        this.rent = rent;
    }

    /** 
     *            @hibernate.property
     *             column="adjustflag"
     *             length="10"
     *             not-null="true"
     *         
     */
    public Integer getAdjustflag() {
        return this.adjustflag;
    }

    public void setAdjustflag(Integer adjustflag) {
        this.adjustflag = adjustflag;
    }

    /** 
     *            @hibernate.property
     *             column="adjustrate"
     *             length="10"
     *         
     */
    public Integer getAdjustrate() {
        return this.adjustrate;
    }

    public void setAdjustrate(Integer adjustrate) {
        this.adjustrate = adjustrate;
    }

    /** 
     *            @hibernate.property
     *             column="adjustunit"
     *             length="10"
     *         
     */
    public Integer getAdjustunit() {
        return this.adjustunit;
    }

    public void setAdjustunit(Integer adjustunit) {
        this.adjustunit = adjustunit;
    }

    /** 
     *            @hibernate.property
     *             column="description"
     *             length="100"
     *         
     */
    public String getDescription() {
        return this.description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("comp_id", getComp_id())
            .toString();
    }

    public boolean equals(Object other) {
        if ( (this == other ) ) return true;
        if ( !(other instanceof BdTollMonthRent) ) return false;
        BdTollMonthRent castOther = (BdTollMonthRent) other;
        return new EqualsBuilder()
            .append(this.getComp_id(), castOther.getComp_id())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getComp_id())
            .toHashCode();
    }

}
